<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Hello React</title>
</head>
<body>
	<div id="root"></div>

	<!-- 添加依赖，三个包，使用 CDN 引入 -->
	<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
  <script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script> 
  <!-- babel -->
  <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>

	<script type="text/babel">
		// React 18 之前 ReactDOM.render
		// ReactDOM.render(<h2>Hello world</h2>, document.querySelector('#root'))

		// REact18 之后
		const root = ReactDOM.createRoot(document.querySelector('#root'))
		root.render(<h2>Hello World</h2>)

	</script>
</body>
</html>